package lanQiao;

import java.util.Scanner;

public class CodeFactory
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		
		String str;
		
		while((str = sc.nextLine()).indexOf("class") == -1){System.out.print(str);}
		
		System.out.print("class Main");
		
		while(!(str = sc.nextLine().trim()).equals("akkz"))System.out.print(str);
	}
}
